$(function (){
    $.ajax({
        type:"post",
        url:"/trimester",
        dataType:"json",
        success:function(data){
            var a= "<td>一节</td>";
            var b= "<td>二节</td>";
            var c= "<td>三节</td>";
            var d= "<td>四节</td>";
            var e= "<td>五节</td>";
            var f= "<td>六节</td>";
            var g= "<td>七节</td>";
            var h = "<th></th>";
            for (var i=0;i<data.length;i++){

                if(data[i].orderTime==1){
                    h+="<td>"+data[i].week+data[i].bookDate+"</td>";
                }
                 if(data[i].orderTime==1){

                    a+="<td>"+data[i].curriculumName+"</td>";
               }
                if(data[i].orderTime==2){

                    b+="<td>"+data[i].curriculumName+"</td>";
                }
                if(data[i].orderTime==3){

                    c+="<td>"+data[i].curriculumName+"</td>";
                }
                if(data[i].orderTime==4){

                    d+="<td>"+data[i].curriculumName+"</td>";
                }
                if(data[i].orderTime==5){

                    e+="<td>"+data[i].curriculumName+"</td>";
                }
                if(data[i].orderTime==6){

                    f+="<td>"+data[i].curriculumName+"</td>";
                }
                if(data[i].orderTime==7){

                    g+="<td>"+data[i].curriculumName+"</td>";
                }
                $("#tr1").html(a);
                $("#tr2").html(b);
                $("#tr3").html(c);
                $("#tr4").html(d);
                $("#tr5").html(e);
                $("#tr6").html(f);
                $("#tr7").html(g);
                $("#trDate").html(h);
        }

            }, error:function(e){
            alert("请求错误");
        }
    })
})